/* The SQL statment to update a new customer into the database is constructed
here based upon the values obtained from the form elements in "modify1.htm",
which are passed as properties of the REQUEST object.
This operation is performed by establishing a cursor
on the CUSTOMER table and performing and calling the "cursor.updateRow()" method.
*/
database.beginTransaction();
cursor = database.cursor("select * from customer where customer.ID = " + request.ID, true);
if (cursor.next())
{
cursor.name = request.name;
cursor.address = request.address;
cursor.city = request.city;
cursor.state = request.state;
cursor.zip = request.zip;
cursor.phone = request.phone;
cursor.updateRow("customer");
}
cursor.close();
database.commitTransaction();
redirect("modify.htm")